<div class="page_title">
    <h2 class="fl">{$pageTitle}</h2>
</div>
{include file="public/public_search" /}
<section class="clearfix stream_list">
{notempty name="list.data"}
    {volist name="list.data" id="vo"}
    <div class="stream_item">
        <div class="stream_bg">
        {switch name="vo.status"}
            {case value="0"}
                <div class="no_stream_snapshot">已禁播</div>
                <div class="stream_uname_title ellipsis">{$vo.user.uname.'-的直播间'}</div>
            {/case}
            {case value="1"}
                <div class="no_stream_snapshot">
                    {neq name="vo.stream_snapshot" value=""}<img src="{$vo.stream_snapshot}?imageMogr2/thumbnail/180x320" />{else /}<div class="no_stream_snapshot">未获取到直播截图</div>{/neq}
                </div>
                <div class="stream_title ellipsis">{$vo.stream_title|default=$vo.user.uname}</div>
                <span class="stream_view_count iconfont iconfont-chakan ellipsis">{:format_num($vo.view_count)}</span>
            {/case}
            {default /}
                <div class="no_stream_snapshot">未开播</div>
                <div class="stream_uname_title ellipsis">{$vo.user.uname.'-的直播间'}</div>
        {/switch}
        </div>
        <div class="stream_hover">
            <div class="stream_info"><a href="javascript:void(0);" data-key="{:encrypt_id($vo.uid)}" style="border-radius: 20px;background: #0099cc;padding: 10px;color: #FFF;" class="inner_btn">直播间详情</a></div>
            <!--<a href="JavaScript:void(0);"  data-key="{:encrypt_id($vo.uid)}" class="edit link_btn iconfont iconfont-bianji"></a>-->
            <!--<a href="JavaScript:void(0);"  data-key="{:encrypt_id($vo.uid)}" class="edit_status link_btn iconfont iconfont-{neq name='vo.status' value='0'}suoding{else /}jiesuo{/neq}"></a>-->
        </div>
    </div>
    {/volist}
{else /}
<div class="not-data">暂时没有主播</div>
{/notempty}
</section>
<aside class="paging">
    {$list.html}
</aside>
<script>
$(function(){
    /** 点击查看详情 **/
    $(".stream_info").click(function(){
        var stream_uid = $(this).find("a").data('key');
        var url = U("admin/Stream/info")+'?dis=stream&stream_uid='+stream_uid;
        admin.getContentByUrl(url);
    });
    /** 点击编辑 **/
    $(".edit").click(function(){
        msg_info('待完成');
        return false;
        var config_id = $(this).data('key');
        var url = U("admin/Gift/gift_edit")+'?config_id='+config_id;
        admin.getContentByUrl(url);
    });
    /** 点击编辑状态--锁 **/
    $(".edit_status").click(function(){
        msg({
            html:$(".edit_status_info").html(),
            yes:'确定',
            no:'取消',
            ext:{
                padding:80,
                allowOutsideClick:false
            }
        },'html',0);
        return false;
        var config_id = $(this).data('key');
        var url = U("admin/Gift/gift_edit")+'?config_id='+config_id;
        admin.getContentByUrl(url);
    });
    $(".stream_item").bind({
        mouseleave:function(){
            //鼠标离开
            $(this).find(".stream_uname_title,.stream_view_count,.stream_title").stop("slideUp").slideDown();
            $(this).find(".stream_hover").stop('slideDown').slideUp();
        },
        mouseenter:function(){
            $(this).find(".stream_uname_title,.stream_view_count,.stream_title").stop("slideDown").slideUp();
            $(this).find(".stream_hover").stop('slideUp').slideDown();
        }
    });
});
</script>